package wx.enums;

/**
 * Created by 76062 on 2017/10/11.
 */
public enum ReqEnum {

    SOS("SOS请求","SOS"),
    JiaZhen("家政","jiazhen"),
    Other("其他","other");

    private String name;
    private String code;

    private ReqEnum(String name, String code) {
        this.name = name;
        this.code = code;
    }
    public static String getName(String code) {
        if(code == null){
            return  "";
        }
        for (ReqEnum c : ReqEnum.values()) {
            if (code.equals(c.getCode())){
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
